Field of the Invention
The present invention relates to an image processing apparatus for generating a wide-angle image by compositing a plurality of images, an image processing method, a storage medium storing an image processing program, and an image pickup apparatus, and in particular, relates to a technique for generating a wide-angle image with satisfactory image quality by reducing halation and black collapse.
Description of the Related Art
In recent years, solid state image pickup devices, such as a CCD sensor and a CMOS sensor, are widely used as image pickup devices in image pickup apparatuses, such as a video camera (television camera) and a still camera. A method for taking a plurality of images for the same scene and compositing these images by calculation is proposed for purposes of expanding a dynamic range of a solid state image pickup device, reducing a noise, controlling camera shake at the time of hand-held photographing, and enlarging an angle of view.
For example, a method for generating a wide-angle image by photographing continuously while shifting a photographing area, matching (alignment) a plurality of obtained images, and compositing the images so that objects are connected is proposed (see Japanese Laid-Open Patent Publication (Kokai) No. 2013-58931 (JP 2013-58931A)). Moreover, a method for obtaining an image of which a dynamic range is expanded by compositing images photographed at different exposures is proposed (see Japanese Laid-Open Patent Publication (Kokai) No. H11-65004 (JP H11-65004A)).
Hereinafter, a method for compositing a plurality of images so as to expand an angle of view is referred to as “wide-angle image composition”, and an image obtained by the wide-angle image composition is referred to as a “wide-angle composite image”.
The technique disclosed in JP 2013-58931A generates a wide-angle composite image by specifying alignment coordinates of photographed images and connecting images at the specified coordinate positions. Accordingly, although a wide-angle composite image that covers an extremely wide angle of view can be generated, a dynamic range of an object is extended and halation and black collapse may be included in the image.
On the other hand, the technique disclosed in JP H11-65004A generates a wide-angle composite image by connecting images photographed at the same exposure value, and then, composites wide-angle composite images of which the exposure values differ. In this case, lots of memory is needed for storing intermediate images, such as the wide-angle composite image generated using images photographed at the same exposure value, generated during the compositing process for generating a wide-angle composite image. As a result, an inexpensive image processing apparatus without lots of memory may slow image-composition velocity or cannot execute image composition.